#ifndef __MAIN_H__
#define __MAIN_H__

#include "io_controller.h"
#include "i2c_device_tree.h"
#include "i2c_dev_com.h"
#include "ads1115.h"
#include "dac8571.h"
#include "bsp_uart.h"
#include "485_slave.h"
#include "rly_controller.h"
#include "485_master.h"
#define DEV_ADR 0x50
typedef struct
{
    uint8_t addr;
    master485_t master485;
} esp32_t;
#define MPUMP_ADR 0x10
#define MPUMP_OPERATE_ADR 0x2000
#define MPUMP_DATA_STATUS_ADR 0x1000 // 1000 0004 r_speed, voltage, current, status
#define MPUMP_TEMPERATURE_ADR 0x1004

#define ESP_MPUMP_OPERATE_ADR 0x002C
#define ESP_MPUMP_DATA_STATUS_ADR 0x0027
#define ESP_MPUMP_TEMPERATURE_ADR 0x002B
extern esp32_t esp32;
esp_err_t esp32_init(esp32_t *esp32);

#endif